package com.aimaoblog.admin.dao;

import com.aimaoblog.pojo.Comment;
import com.aimaoblog.vo.CommentSearchResultVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    List<Comment> selectCommentAll(Integer articleId);

    List<Comment> selectReplyAll(@Param("articleId") Integer articleId, @Param("parentId") Integer parentId);

    List<CommentSearchResultVo> selectCommentSearchList(Integer size);

    List<CommentSearchResultVo> selectCommentSearchByArticleKey(String key);

    int deleteByParentId(Integer parentId);
}